<test>
  <sql>SELECT	TOP 50
		o.OrderID,
		c.ContactName
FROM	Orders o,
		Customers c
WHERE	c.CustomerID.Length = o.CustomerID.Length
ORDER	BY 1, 2</sql>
  <expectedResults>
    <NewDataSet>
  <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table1" msdata:Locale="en-US">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="OrderID" type="xs:int" minOccurs="0" />
                <xs:element name="ContactName" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Alejandra Camino</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Alexander Feuer</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Ana Trujillo</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Anabela Domingues</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>André Fonseca</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Ann Devon</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Annette Roulet</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Antonio Moreno</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Aria Cruz</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Art Braunschweiger</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Bernardo Batista</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Carine Schmitt</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Carlos González</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Carlos Hernández</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Catherine Dewey</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Christina Berglund</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Daniel Tonini</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Diego Roel</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Dominique Perrier</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Eduardo Saavedra</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Elizabeth Brown</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Elizabeth Lincoln</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Felipe Izquierdo</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Fran Wilson</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Francisco Chang</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Frédérique Citeaux</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Georg Pipps</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Giovanni Rovelli</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Guillermo Fernández</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Hanna Moos</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Hari Kumar</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Helen Bennett</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Helvetius Nagy</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Henriette Pfalzheim</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Horst Kloss</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Howard Snyder</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Isabel de Castro</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Jaime Yorres</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Janete Limeira</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Janine Labrune</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Jean Fresnière</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>John Steel</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Jonas Bergulfsen</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Jose Pavarotti</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>José Pedro Freyre</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Jytte Petersen</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Karin Josephs</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Karl Jablonski</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Laurence Lebihan</ContactName>
  </Table1>
  <Table1>
    <OrderID>10248</OrderID>
    <ContactName>Lino Rodriguez</ContactName>
  </Table1>
</NewDataSet>
  </expectedResults>
  <expectedPlan>
    <executionPlan>
      <element operator="Select">
        <properties>
          <property name="Output List.[0]" value="o.OrderID AS OrderID" />
          <property name="Output List.[0].Table" value="o" />
          <property name="Output List.[0].Column" value="OrderID" />
          <property name="Output List.[0].DataType" value="Int32" />
          <property name="Output List.[0].Output Name" value="OrderID" />
          <property name="Output List.[1]" value="c.ContactName AS ContactName" />
          <property name="Output List.[1].Table" value="c" />
          <property name="Output List.[1].Column" value="ContactName" />
          <property name="Output List.[1].DataType" value="String" />
          <property name="Output List.[1].Output Name" value="ContactName" />
        </properties>
        <input>
          <element operator="Top">
            <properties>
              <property name="Output List.[0]" value="c.ContactName" />
              <property name="Output List.[0].Table" value="c" />
              <property name="Output List.[0].Column" value="ContactName" />
              <property name="Output List.[0].DataType" value="String" />
              <property name="Output List.[1]" value="o.OrderID" />
              <property name="Output List.[1].Table" value="o" />
              <property name="Output List.[1].Column" value="OrderID" />
              <property name="Output List.[1].DataType" value="Int32" />
              <property name="Statistics.Open Count" value="1" />
              <property name="Statistics.Row Count" value="50" />
              <property name="Statistics.Average Row Count" value="50" />
              <property name="Limit" value="50" />
              <property name="With Ties" value="False" />
            </properties>
            <input>
              <element operator="Sort">
                <properties>
                  <property name="Output List.[0]" value="c.ContactName" />
                  <property name="Output List.[0].Table" value="c" />
                  <property name="Output List.[0].Column" value="ContactName" />
                  <property name="Output List.[0].DataType" value="String" />
                  <property name="Output List.[1]" value="o.OrderID" />
                  <property name="Output List.[1].Table" value="o" />
                  <property name="Output List.[1].Column" value="OrderID" />
                  <property name="Output List.[1].DataType" value="Int32" />
                  <property name="Statistics.Open Count" value="1" />
                  <property name="Statistics.Row Count" value="51" />
                  <property name="Statistics.Average Row Count" value="51" />
                  <property name="Logical Operator" value="Sort" />
                  <property name="Order By.[0]" value="o.OrderID ASC" />
                  <property name="Order By.[0].Table" value="o" />
                  <property name="Order By.[0].Column" value="OrderID" />
                  <property name="Order By.[0].DataType" value="Int32" />
                  <property name="Order By.[0].Order" value="ASC" />
                  <property name="Order By.[1]" value="c.ContactName ASC" />
                  <property name="Order By.[1].Table" value="c" />
                  <property name="Order By.[1].Column" value="ContactName" />
                  <property name="Order By.[1].DataType" value="String" />
                  <property name="Order By.[1].Order" value="ASC" />
                </properties>
                <input>
                  <element operator="HashMatch">
                    <properties>
                      <property name="Output List.[0]" value="c.ContactName" />
                      <property name="Output List.[0].Table" value="c" />
                      <property name="Output List.[0].Column" value="ContactName" />
                      <property name="Output List.[0].DataType" value="String" />
                      <property name="Output List.[1]" value="o.OrderID" />
                      <property name="Output List.[1].Table" value="o" />
                      <property name="Output List.[1].Column" value="OrderID" />
                      <property name="Output List.[1].DataType" value="Int32" />
                      <property name="Statistics.Open Count" value="1" />
                      <property name="Statistics.Row Count" value="75,530" />
                      <property name="Statistics.Average Row Count" value="75,530" />
                      <property name="Hash Keys Build" value="Expr1002" />
                      <property name="Hash Keys Build.Column" value="Expr1002" />
                      <property name="Hash Keys Build.DataType" value="Int32" />
                      <property name="Hash Keys Probe" value="Expr1005" />
                      <property name="Hash Keys Probe.Column" value="Expr1005" />
                      <property name="Hash Keys Probe.DataType" value="Int32" />
                      <property name="Logical Operator" value="Inner Join" />
                    </properties>
                    <input>
                      <element operator="ComputeScalar">
                        <properties>
                          <property name="Output List.[0]" value="c.ContactName" />
                          <property name="Output List.[0].Table" value="c" />
                          <property name="Output List.[0].Column" value="ContactName" />
                          <property name="Output List.[0].DataType" value="String" />
                          <property name="Output List.[1]" value="Expr1002" />
                          <property name="Output List.[1].Column" value="Expr1002" />
                          <property name="Output List.[1].DataType" value="Int32" />
                          <property name="Statistics.Open Count" value="1" />
                          <property name="Statistics.Row Count" value="91" />
                          <property name="Statistics.Average Row Count" value="91" />
                          <property name="Defined Values.[0]" value="Expr1002 = c.CustomerID.Length" />
                          <property name="Defined Values.[0].Target" value="Expr1002" />
                          <property name="Defined Values.[0].DataType" value="Int32" />
                          <property name="Defined Values.[0].Source" value="c.CustomerID.Length" />
                        </properties>
                        <input>
                          <element operator="TableScan">
                            <properties>
                              <property name="Table" value="Customers AS c" />
                              <property name="Output List.[0]" value="c.CustomerID" />
                              <property name="Output List.[0].Table" value="c" />
                              <property name="Output List.[0].Column" value="CustomerID" />
                              <property name="Output List.[0].DataType" value="String" />
                              <property name="Output List.[1]" value="c.ContactName" />
                              <property name="Output List.[1].Table" value="c" />
                              <property name="Output List.[1].Column" value="ContactName" />
                              <property name="Output List.[1].DataType" value="String" />
                              <property name="Statistics.Open Count" value="1" />
                              <property name="Statistics.Row Count" value="91" />
                              <property name="Statistics.Average Row Count" value="91" />
                            </properties>
                            <input />
                          </element>
                        </input>
                      </element>
                      <element operator="ComputeScalar">
                        <properties>
                          <property name="Output List.[0]" value="o.OrderID" />
                          <property name="Output List.[0].Table" value="o" />
                          <property name="Output List.[0].Column" value="OrderID" />
                          <property name="Output List.[0].DataType" value="Int32" />
                          <property name="Output List.[1]" value="Expr1005" />
                          <property name="Output List.[1].Column" value="Expr1005" />
                          <property name="Output List.[1].DataType" value="Int32" />
                          <property name="Statistics.Open Count" value="1" />
                          <property name="Statistics.Row Count" value="830" />
                          <property name="Statistics.Average Row Count" value="830" />
                          <property name="Defined Values.[0]" value="Expr1005 = o.CustomerID.Length" />
                          <property name="Defined Values.[0].Target" value="Expr1005" />
                          <property name="Defined Values.[0].DataType" value="Int32" />
                          <property name="Defined Values.[0].Source" value="o.CustomerID.Length" />
                        </properties>
                        <input>
                          <element operator="TableScan">
                            <properties>
                              <property name="Table" value="Orders AS o" />
                              <property name="Output List.[0]" value="o.OrderID" />
                              <property name="Output List.[0].Table" value="o" />
                              <property name="Output List.[0].Column" value="OrderID" />
                              <property name="Output List.[0].DataType" value="Int32" />
                              <property name="Output List.[1]" value="o.CustomerID" />
                              <property name="Output List.[1].Table" value="o" />
                              <property name="Output List.[1].Column" value="CustomerID" />
                              <property name="Output List.[1].DataType" value="String" />
                              <property name="Statistics.Open Count" value="1" />
                              <property name="Statistics.Row Count" value="830" />
                              <property name="Statistics.Average Row Count" value="830" />
                            </properties>
                            <input />
                          </element>
                        </input>
                      </element>
                    </input>
                  </element>
                </input>
              </element>
            </input>
          </element>
        </input>
      </element>
    </executionPlan>
  </expectedPlan>
</test>